# -*- coding: utf-8 -*-

from wsgiref.simple_server import make_server

def application(environ,start_response):
    start_response('200 OK', [('Content-Type', 'text/html')])
    path = environ['PATH_INFO']
    method = environ['METHOD']
    return '<H1>Hello, Web !</H1>', '<h1>Hello, %s!</h1>' % (environ['PATH_INFO'][1:] or 'web')

httpd = make_server('', 8888, application)
print 'Server start listen on 8888'
httpd.serve_forever()